package util;

import java.io.Serializable;
import java.sql.Timestamp;


/**
 * Information about the project such as project create date, save date, etc.
 * @author Jacob Freemyer
 *
 */
@SuppressWarnings("serial")
public class MetaData implements Serializable {

	/**
	 * The date that the project was last opened
	 */
	private Timestamp lastOpened;
	/**
	 * The date that the project was last saved 
	 */
	private Timestamp lastSaved;
	/**
	 * The date that the project was created
	 */
	private Timestamp dateCreated;
	
	/**
	 * Creates a new metadata, setting all values to the date specified
	 * @param pDateCreated the date to initialize the metadata to
	 */
	public MetaData(Timestamp pDateCreated)
	{
		lastOpened = pDateCreated;
		lastSaved = pDateCreated;
		dateCreated = pDateCreated;
	}
	/**
	 * Sets the date last opened
	 * @param pNewstamp the date last opened
	 */
	public void setLastOpened(Timestamp pNewstamp)
	{
		lastOpened = pNewstamp;
	}
	
	/**
	 * Sets the date last saved
	 * @param pNewstamp the date last saved
	 */
	public void setLastSaved(Timestamp pNewstamp)
	{
		lastSaved = pNewstamp;
	}
	
	/**
	 * Gets the date last opened
	 * @return the date last opened
	 */
	public Timestamp getLastOpened()
	{
		return lastOpened;
	}
	
	/**
	 * Gets teh date last saved
	 * @return the date last saved
	 */
	public Timestamp getLastSaved()
	{
		return lastSaved;
	}
	
	/**
	 * Gets the date created
	 * @return the date created
	 */
	public Timestamp getDateCreated()
	{
		return dateCreated;
	}
}
